package com.leetcode.根据数据结构分类.数组;

/**
 * @author: ZhouBert
 * @date: 2021/3/19
 * @description: 1603. 设计停车系统
 * https://leetcode-cn.com/problems/design-parking-system/
 */
public class A_1603_设计停车系统 {


	static class ParkingSystem {

		/**
		 * 分别对应 carType
		 */
		int[] parks = new int[4];

		public ParkingSystem(int big, int medium, int small) {
			parks[1] = big;
			parks[2] = medium;
			parks[3] = small;
		}

		public boolean addCar(int carType) {
			if (parks[carType] == 0){
				return false;
			}
			parks[carType]--;
			return true;
		}
	}
}
